package com.northpool.operator.common.database.bean;

import java.util.Properties;

public class NacosProperties {
    String serverAddr; // nacos地址
    String namespace; // nacos命名空间
    String username; // nacos用户名
    String password; // nacos密码
    String group; //nacos分组

    public String getServerAddr() {
        return serverAddr;
    }

    public void setServerAddr(String serverAddr) {
        this.serverAddr = serverAddr;
    }

    public String getNamespace() {
        return namespace;
    }

    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public Properties getProperties() {
        Properties properties = new Properties();
        properties.put("serverAddr", serverAddr);
        properties.put("namespace", namespace);
        properties.put("username", username);
        properties.put("password", password);
        properties.put("group", group);
//        properties.put("logAllProperties", "true");
//        properties.put("clientWorkerMaxThreadCount", "2");
//        properties.put("clientWorkerThreadCount", "2");
//        properties.put("enableRemoteSyncConfig", "true");
//        properties.put("configRequestTimeout", "3000");
//        properties.put("configRetryTime", "300");
//        properties.put("configLongPollTimeout", "300");
        return properties;
    }
}
